{% extends "learning_logs/base.html" %}

{% block header %}
    <h1>主题</h1>
{% endblock header %}

{% block content %}

    <ul>
        {% for topic in topics %}
            <li>
                <h3>
                    <a href="{% url 'learning_logs:topic' topic.id %}">
                        {{ topic }}
                    </a>
                </h3>
            </li>
        {% empty %}
            <li>尚未添加主题。<li>
        {% endfor %}
    </ul>

    <h3><a href="{% url 'learning_logs:new_topic' %}">添加新主题</a></h3>

{% endblock content %}
